<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<%layout("/WEB-INF/view/common/inc/admin_head.html",{title:'', styles:'bootstrap,font-awesome,animate,style,bootstrap-table,layui-date'}){}%>
</head>

<body>

<div class="wrapper wrapper-content">
	<div class="row">
		<div class="col-sm-12">
			<!-- START 数据表格 -->
			<table id="dealTable"
				   data-toolbar="#toolbar"
				   data-side-pagination="server"
				   data-pagination="true"
				   data-resizable="true"
				   data-side-pagination="server"
				   data-url="/sea/supply/record/findByCnd.do?produceId=${produceId}"
				   data-page-size="15">
			</table>
			<!-- END 数据表格 -->

			<!-- END 右侧数据 -->
		</div>
	</div>
</div>

<%layout("/WEB-INF/view/common/inc/admin_js.html",{modules:'jquery,bootstrap,bootstrap-table,bootstrap-table-zh-CN,layer,laydate'}){}%>
<script>
    var $dealTable = $('#dealTable'),selections=[];

    $(function(){
        //START 表格配置
        $dealTable.bootstrapTable({
            height: getHeight(),
            columns: [
                {
                    title: '状态',
                    field: 'produceStatus',
                    align: 'left',
                    valign: 'middle',
					formatter:function (v, r) {
                    	switch (v) {
							case 1:
								return '未审核';
								break;
							case 2:
								return '审核中';
								break;
							case 3:
								return '审核通过';
								break;
							case 4:
								return '拒绝';
								break;
							case 5:
								return '作废';
								break;
							case 31:
								return '部分收货';
								break;
							case 32:
								return '全部收货';
								break;
							case 33:
								return '手工关闭';
								break;
							case 34:
								return '未收关闭';
								break;
						}
					}
                },
				{
					title: '备注',
					field: 'produceRemark',
					align: 'left',
					valign: 'middle'
				},
                {
                    title: '操作人',
                    field: 'produceMember',
                    align: 'left',
                    valign: 'middle'
                },{
					title: '操作时间',
					field: 'createTime',
					align: 'left',
					valign: 'middle',
					formatter:function (v,r) {
						if (v == null) {
							return '';
						}
						v = v.substr(0, 11);
						return v;
					}
				}
            ],
            onLoadSuccess : function() {

            }
        });
        //END 表格配置

        //表格高度自适应
        $(window).resize(function () {
            $dealTable.bootstrapTable('resetView', {
                height: getHeight()
            });
        });
    });


    //表格高度计算
    function getHeight() {
        return $(window).height() - $('.btn-group').outerHeight(true) - $('.breadcrumb').outerHeight(true)-60;
    }
</script>
</body>
</html>
